<?php
/**
 * Created by PhpStorm.
 * User: td
 * Date: 15/2/12
 * Time: 下午8:33
 */

namespace Home\Model;
use Think\Model;

class AttachmentModel extends Model {

    protected $tableName = 'attachment';
    protected $pk        = 'attachment_id';

    public function deletePhotoExp($exp_id,$image_url){
        $attachment_map['exp_id'] = $exp_id;
        $attachment_map['image_url'] = $image_url;
        $attachment_result = $this->where($attachment_map)->delete();
        if($attachment_result){
            return true;
        }else{
            return false;
        }
    }

} 